import { ReactNode, lazy } from 'react'
import {Navigate} from "react-router-dom";
import layout from "@/router/layout.tsx";

const Login = lazy(() => import('@/views/Login/index.tsx'))

export interface IMenuRoutes {
    path: string
    element: ReactNode
    key?: string
    icon?: ReactNode
    label?: string,
    hide?: string
    parent?: string
    title?: string
    children?: Array<IMenuRoutes>
}

const element: Array<IMenuRoutes> = [
    layout,
    {
        path: '/login',
        element: <Login />,
        hide: 'false'
    },
    {
        path: '*',
        element: <Navigate to={'/dashboard'} />,
        hide: 'false'
    }
]

export default element
